﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace WEALTH.Manager.Customer
{
    public partial class OrderDetail : System.Web.UI.Page
    {
        private ExcuteDao dao = new ExcuteDao();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                if (!string.IsNullOrEmpty(Request.QueryString["cID"]))
                {
                    Session["UrlType"] = "Editorder";
                    Session["Edit_orderID"] = SpecialCharHandler.HtmlDiscode(Request.QueryString["cID"]).Replace("&amp;", "&");

                    SetInitData();
                }
            }
        }
        /// <summary>
        /// 设置初始化页面信息
        /// </summary>
        private void SetInitData()
        {
            //获取产品信息
            DataTable dtProduct = dao.GET_YUYUE_BYID(Convert.ToInt32(Request.QueryString["cID"]));
            if (dtProduct.Rows.Count > 0)
            {
                txtname.Text = SpecialCharHandler.HtmlDiscode(dtProduct.Rows[0]["cname"].ToString()) + " " + dtProduct.Rows[0]["csex"].ToString();
                txtphone.Text = SpecialCharHandler.HtmlDiscode(dtProduct.Rows[0]["ctel"].ToString());
                txtmobilphone.Text = SpecialCharHandler.HtmlDiscode(dtProduct.Rows[0]["cphone"].ToString());
                txtemail.Text = SpecialCharHandler.HtmlDiscode(dtProduct.Rows[0]["cemail"].ToString());
                txtAddress.Text = SpecialCharHandler.HtmlDiscode(dtProduct.Rows[0]["caddress"].ToString());
                txtzipcode.Text = SpecialCharHandler.HtmlDiscode(dtProduct.Rows[0]["czipcode"].ToString());
                txtAge.Text = SpecialCharHandler.HtmlDiscode(dtProduct.Rows[0]["cage"].ToString());
                txtguoqutouzi.Text = SpecialCharHandler.HtmlDiscode(dtProduct.Rows[0]["cguoqutouzi"].ToString());
                txtliaojie.Text = SpecialCharHandler.HtmlDiscode(dtProduct.Rows[0]["cliaojielicai"].ToString());
                txtxuqiu.Text = SpecialCharHandler.HtmlDiscode(dtProduct.Rows[0]["cxuqiu"].ToString());
            }
        }
    }
}